package com.bdqn.qnnews.wemedia.convert;

import com.bdqn.qnnews.wemedia.api.dto.WmUserDto;
import com.bdqn.qnnews.wemedia.entity.WmUser;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * @author xlzhang
 */
@Mapper
public interface WmUserConvert {
    /**
     * 转换类实例
     */
    WmUserConvert INSTANCE = Mappers.getMapper(WmUserConvert.class);

    /**
     * WmUser转换为Dto
     * @param entity WmUser对象
     * @return Dto对象
     */
    WmUserDto entityToDto(WmUser entity);

    /**
     * Dto转换为WmUser
     * @param dto Dto对象
     * @return 实体对象
     */
    WmUser dtoToEntity(WmUserDto dto);
}